package com.huilang1.demo1;

public class Client {
    public static void main(String[] args) {
        FriedNoodles friedNoodles = new FriedNoodles();
        FastFood fastFood=new Egg(friedNoodles);
        System.out.println(fastFood.getDesc());
        System.out.println(fastFood.cost());

        fastFood=new Egg(fastFood);
        System.out.println(fastFood.getDesc());
        System.out.println(fastFood.cost());

        fastFood=new Bacon(fastFood);
        System.out.println(fastFood.getDesc());
        System.out.println(fastFood.cost());

    }
}
